<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/jsp/public/common.jspf" %>

<html>
<head>
    <title>算法详情</title>
</head>
<body>
<div class="col-sm-9">

    <div class="row">

        <!-- Blog Post Content Column -->
        <div class="col-lg-12">

            <!-- Blog Post -->

            <!-- Title -->
            <h1>${title}</h1>

            <!-- Author -->
            <p class="lead">
                作者：${author.name}
            </p>

            <hr>

            <!-- Date/Time -->
            <p>
                <span class="glyphicon glyphicon-time"></span> 上传日期：<s:date name="createTime"/>&nbsp;&nbsp;&nbsp;&nbsp;
                <span class="glyphicon glyphicon-save glyphicon-white">下载量：${downloadCount}</span>
            </p>

            <hr>

            <!-- Preview Image -->
            <s:url action="article_getImage?id=%{id}" var="imgUrl"/>
            <img class="img-responsive" src="<s:property value="#imgUrl"/>" alt="">

            <hr>

            <!-- Post Content -->
            <p>${description}</p>

            <hr>

            <!--Download URL-->

            <p class="text-right">${attachmentFileName}<s:a cssClass="btn btn-success btn-xs"
                                                            action="article_getAttachment?id=%{id}"><i
                    class="glyphicon glyphicon-save glyphicon-white"></i> 下载算法</s:a></p>

            <p>

            </p>
            <hr>

            <!-- Blog Comments -->

            <!-- Comments Form -->
            <div class="well">
                <h4>评论:</h4>

                <s:form role="form" method="post" action="article_comment">
                    <s:hidden name="id"/>
                    <div class="form-group">
                        <textarea class="form-control" rows="3" name="comment"></textarea>
                    </div>
                    <button type="submit" class="btn btn-primary">提交</button>
                </s:form>
            </div>


            <hr>
            <!-- Posted Comments -->
            <s:iterator value="replies">
                <div class="media">
                    <a class="pull-left" href="#">
                        <img class="media-object" src="${pageContext.request.contextPath}/styles/images/head.jpg" alt="">
                    </a>

                    <div class="media-body">
                        <h4 class="media-heading">${author.name}
                            <small><s:date name="createTime"/></small>
                        </h4>
                            ${content}
                    </div>
                </div>
            </s:iterator>
            <!-- Comment -->
        </div>
    </div>
</div>
</body>
</html>
